#ifndef IA041_H
#define IA041_H
#include <stdio.h>
#define ARGC_ERROR 0
#define FOPEN_ERROR 1
#define MALLOC_ERROR 2
#define FALSE 0
#define TRUE  1

/*
  Some functions return TRUE or FALSE.  You must use the symbols.  If
  you use 1 or 0, you will receive 10% penalty for each violation.
 */

void printError(int code);
/* print error messages */

int countInts(FILE * fptr);
/* return the number of integers stored in the file */

void readInts(FILE * fptr, int * array, int length);
/* read integers from the file, the number of integers are specified
   by length */

int arePositive(int * array, int size);
/* return TRUE (not 1) if all elements are positive (> 0). return
   FALSE (not 0) if one or more are 0 or negative */

int areIncreasing(int * array, int size);
/* return TRUE if the elements are increasing, i.e. array[i] < array[j]
   if i < j. 

   return FALSE if the elements are not increasing */

int areDistinct(int * array, int size);
/* return TRUE if all elements are distinct, i.e. array[i] is
   different from array[j] if i and j are different

   return FALSE if the same value appears in two or more
   elements. i.e.  you can find i and j such that array[i] is the same
   as from array[j] even though i and j are different */

#endif
